<?php
// module/Foo/src/Foo/View/Helper
 
namespace Admin\View\Helper;
 
use Zend\Authentication\AuthenticationService;
use Zend\View\Helper\AbstractHelper;
use Zend\Db\Adapter\Adapter;
 
class MainMenu extends AbstractHelper
{
    protected $adapter;
 
    public function __construct(Adapter $adapter)
    {
        $this->adapter = $adapter;
    }
 
    public function __invoke()
    {
        $authSer = new AuthenticationService();
        $user = $authSer->getIdentity();
        $result = $this->adapter->query("call uac_menu_select(?);",
                                        array($user->userid));
        return $result->toArray();
    }
}